<template>
    <div>
        <template>
            <div>
                <el-table :data="buildingNumberList" border stripe height="860" :summary-method="getSummaries"
                    show-summary :header-cell-style="{ 'text-align': 'center' }"
                    :cell-style="{ 'text-align': 'center' }">
                    <el-table-column prop="" label="单体成本分摊表(一)">
                        <el-table-column fixed prop="number" label="楼号">
                        </el-table-column>
                        <el-table-column prop="sum_floor" label="层数">
                        </el-table-column>
                        <el-table-column prop="sum_area" label="建筑面积" :formatter="stateFormat">
                        </el-table-column>
                        <el-table-column prop="sum_land" label="底座面积" :formatter="stateFormat">
                        </el-table-column>
                        <el-table-column prop="sum_land_ratio" label="土地分摊比例">
                        </el-table-column>
                        <el-table-column prop="sum_area_ratio" label="其他分摊比例">
                        </el-table-column>
                        <el-table-column prop="sum_land_syq" label="分摊土地使用权支付金额" :formatter="stateFormat">
                        </el-table-column>
                        <el-table-column prop="sum_land_cq" label="分摊土地征用及拆迁补偿费" :formatter="stateFormat">
                        </el-table-column>
                        <el-table-column prop="sum_qtcb" label="分摊的其他成本" :formatter="stateFormat">
                        </el-table-column>
                        <el-table-column prop="sum_heji" label="成本合计" :formatter="stateFormat">
                        </el-table-column>
                    </el-table-column>
                </el-table>
            </div>
        </template>
    </div>
</template>

<script>
import calculateApi from '@/api/calculate'

export default {
    data() {
        return {
            calculate_id: '',
            buildingNumberList: []
        }

    },
    methods: {


        getCalculateBuildingNumberList() {
            calculateApi.getCalculateBuildingNumberList(this.calculate_id).then(response => {
                this.buildingNumberList = response.data.list;
            })
        },
    },
    created() {
        var query = this.$route.query;
        if (query.id) {
            this.calculate_id = query.id;
        }

        this.getCalculateBuildingNumberList();
    },
}
</script>

<style></style>